<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/easyui/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/easyui/locale/easyui-lang-zh_CN.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程定义管理</title>
</head>
<body>
<table id="processDefinitionTable" fit="true"></table>
</body>
<script type="text/javascript">
$(function(){
	$("#processDefinitionTable").datagrid({
		url:"${pageContext.request.contextPath}/getAllProcessDefinitionByPage",
		title:"流程定义管理",
		toolbar:"#tb",
		fitColumns:true,
		rownumbers:true,
		pagination:true,
		//singleSelect:true,
		columns:[[
			{field:'ck',checkbox:"true"},
			{field:"id",title:"编号",width:3,align:"center"},
			{field:"name",title:"流程名称",width:3,align:"center"},
			{field:"key",title:"流程定义的key",width:3,align:"center"},
			{field:"version",title:"流程版本",width:3,align:"center"},
			{field:"resourceName",title:"流程文件名称",width:3,align:"center"},
			{field:"diagramResourceName",title:"流程图片名称",width:3,align:"center"},
			{field:"deploymentId",title:"流程部署Id",width:3,align:"center"},
			{field:"operation",title:"操作",width:2,align:"center",formatter:processOperation},
		]]
	})
	
})

function processOperation(value,row){
	return "<a target='_blank' href='${pageContext.request.contextPath}/showView?deploymentId="+row.deploymentId+"&diagramResourceName="+row.diagramResourceName+"'>查看流程图</a> ";
}







</script>
</html>